{% extends "themes/ecobusiness/base.html" %}

{% load i18n %}

{% block breadcrumbs %}
	{% if page.breadcrumbs %}
		{% for breadcrumb in page.breadcrumbs %}
			<a href="{{ breadcrumb.path }}">{{ breadcrumb.name }}</a>
			{% if not forloop.last %}
			  &raquo;
			{% endif %}
	    {% endfor %}
	{% endif %}
{% endblock %}
{% block heading %}
  	{% block title %}
		{{ page.title|escape }}
	{% endblock %}	
{% endblock %}

{% block content %}
	 {% if page.content %}
	   <p>{{ page.content|safe }}</p>
	 {% else %}
	   <p>{% trans "This page does not yet have any content." %}</p>
	 {% endif %} 
{% endblock %}

{% block right_column %}
{% if is_editor %}
	 <div id="rightcolumn">
			<div class="rightbox_wrapper">
				<div class="rightbox">
					<div class="product_wrapper">
						<a href="{% url admin-edit-page page.key.id %}">{% trans "Edit page" %}</a>
					</div>
					<div class="product_wrapper">
						<a href="{% url admin-new-page page.key.id %}">{% trans "Add child" %}</a>
					</div>
					{% if files %}
					<div class="product_wrapper">
					    <h1>{% trans "Attached files" %}:</h1>
					    <ul style="list-style-type:none">
					    {% for file in files %}
					      <li style="list-style-image:url({{file.icon}})">
					      {% if file.url %}
					        <a href="{{ file.url }}">
					      {% else %}
					        <a href="{% url get-url file.path %}">
					      {% endif %}
					          {{ file.name }}</a>
					    {% endfor %}
					    </ul>
					</div>
					{% endif %}
					
				</div>
			</div>
		</div>
	 {% endif %}
{% endblock %}
